<#import "/common/taglibs/spring.ftl" as spring/>
<#macro showMessage detail="">
	<#if successMessage??>
		<#local message=successMessage>
	</#if>
	<#if errorMessage??>
		<#local error=errorMessage>
	</#if>
	<#if message??>
		<div class="m-alert m-alert--icon alert alert-primary" role="alert" data-role="alert-success">
			<div class="m-alert__icon">
				<i class="la la-warning"></i>
			</div>
			<div class="m-alert__text">
				<@spring.message code="${message}"/> ${detail}
			</div>
			<div class="m-alert__close">
				<button type="button" class="close" data-close="alert" aria-label="Close">
				</button>
			</div>
		</div>
	</#if>
	<#if error??>
		<div class="m-alert m-alert--icon alert alert-danger" role="alert" data-role="alert-error">
			<div class="m-alert__icon">
				<i class="la la-warning"></i>
			</div>
			<div class="m-alert__text">
				<@spring.message code="${error}"/> ${detail}
			</div>
			<div class="m-alert__close">
				<button type="button" class="close" data-close="alert" aria-label="Close">
				</button>
			</div>
		</div>
	</#if>
</#macro>